<!DOCTYPE html>
<html>
<head>
    <meta charset="UTF-8">
    <title>Document</title>
    <style>
        
    </style>
</head>
<body>
    
</body>
<script>

    var str = navigator.userAgent;

    if(str.indexOf("Chrome") !== -1){
        console.log("Chrome浏览器")
    }else if(str.indexOf("Firefox") !== -1){
        console.log("FireFox浏览器")
    }else if(str.indexOf("Safari") !== -1){
        console.log("Safari浏览器")
    }else{
        console.log("非 常用浏览器")
    }
    
</script>
</html>